// ==========================================================================
// GFast自动生成model操作代码。
// 生成日期：2024-11-12 18:34:15
// 生成路径: internal/app/system/model/order_types.go
// 生成人：zhou
// desc:订单类型
// company:云南奇讯科技有限公司
// ==========================================================================

package model

import (
	"github.com/gogf/gf/v2/os/gtime"
	"github.com/gogf/gf/v2/util/gmeta"
	comModel "github.com/tiger1103/gfast/v3/internal/app/common/model"
)

// OrderTypesInfoRes is the golang structure for table order_types.
type OrderTypesInfoRes struct {
	gmeta.Meta  `orm:"table:order_types"`
	Id          int         `orm:"id,primary" json:"id,string" dc:""`    //
	Name        string      `orm:"name" json:"name" dc:""`               //
	Description string      `orm:"description" json:"description" dc:""` //
	IsDel       int         `orm:"is_del" json:"isDel" dc:""`            //
	CreatedAt   *gtime.Time `orm:"created_at" json:"createdAt" dc:""`    //
	UpdatedAt   *gtime.Time `orm:"updated_at" json:"updatedAt" dc:""`    //
}

type OrderTypesListRes struct {
	Id          int         `json:"id,string" dc:""`
	Name        string      `json:"name" dc:""`
	Description string      `json:"description" dc:""`
	IsDel       int         `json:"isDel" dc:""`
	CreatedAt   *gtime.Time `json:"createdAt" dc:""`
}

// OrderTypesSearchReq 分页请求参数
type OrderTypesSearchReq struct {
	comModel.PageReq
	Id          string `p:"id" dc:""`                                                       //
	Name        string `p:"name" dc:""`                                                     //
	Description string `p:"description" dc:""`                                              //
	IsDel       string `p:"isDel" v:"isDel@integer#需为整数" dc:""`                             //
	CreatedAt   string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式" dc:""` //
}

// OrderTypesSearchRes 列表返回结果
type OrderTypesSearchRes struct {
	comModel.ListRes
	List []*OrderTypesListRes `json:"list"`
}

// OrderTypesAddReq 添加操作请求参数
type OrderTypesAddReq struct {
	Name        string `p:"name" v:"required#不能为空" dc:""`
	Description string `p:"description"  dc:""`
	IsDel       int    `p:"isDel"  dc:""`
}

// OrderTypesEditReq 修改操作请求参数
type OrderTypesEditReq struct {
	Id          int    `p:"id" v:"required#主键ID不能为空" dc:""`
	Name        string `p:"name" v:"required#不能为空" dc:""`
	Description string `p:"description"  dc:""`
	IsDel       int    `p:"isDel"  dc:""`
}
